import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
	state(){
		return{
			list: uni.getStorageSync('history') || []
		}
	},
	mutations:{
		
	},
	actions:{
		setList(state,newItem){
		    state.list.unshift(newItem)
			uni.setStorageSync('history', state.list)
		}
	},
	getters:{
		
	}
})
export default store